<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:substituteby="template::docHead(#{system.name},'首页')">
</head>
<body>
<script type="text/javascript" th:substituteby="main.js::js"></script>
<style type="text/css">
    html {
        height: 100%
    }

    body {
        height: 100%;
        margin: 0px;
        padding: 0px
    }

    #container {
        height: 750px;
    }

    .myRow {
        margin: 0 auto;
        border-bottom: 1px solid #CCCCCC;
        padding: .5em;
    }
</style>
<nav th:replace="template::nav"></nav>
<div class="row" style="margin-top: 5em;">
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <nav class="navbar navbar-default">
                    <div class="container-fluid">
                        <div class="navbar-header">
                            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                                    data-target="#bs-example-navbar-collapse-2" aria-expanded="false">
                                <span class="sr-only">Toggle navigation</span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                            </button>
                            <a class="navbar-brand" href="#">用户资料管理：</a>
                        </div>
                        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-2">
                            <a th:href="@{/toadduser(access_token=${accessToken})}" class="btn btn-primary navbar-btn">
                                <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
                                添加用户
                            </a>
                            <form class="navbar-form navbar-right" role="search" method="get" th:action="@{/store/classroom}">
                                <div class="form-group">
                                    <input class="form-control" placeholder="查询" id="dataType" name="name" type="text"/>
                                    <input name="access_token" th:value="${accessToken}" type="hidden"/>
                                </div>
                                <button type="submit" class="btn btn-default">查询</button>
                            </form>
                        </div>
                    </div>
                </nav>
            </div>
        </div>
        <div class="row">
            <div class="col-md-6 col-md-offset-3">
                <div class="table-responsive">
                    <table class="table table-striped">
                        <thead>
                        <tr>
                            <th>名称</th>
                            <th>编号</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr th:each="user:${data}">
                            <td th:text="${user.name}"></td>
                            <td th:text="${user.number}"></td>
                            <td>
                                <a type="button" class="btn btn-xs btn-info" th:href="@{/toadduser(id=${user.id},access_token=${accessToken})}">
                                    <span class="glyphicon glyphicon-edit" aria-hidden="false"></span>
                                </a>
                                &nbsp;&nbsp;
                                <a type="button" class="btn btn-xs btn-danger" th:href="@{/delUser(id=${user.id},access_token=${accessToken})}">
                                    <span class="glyphicon glyphicon-remove" aria-hidden="false"></span>
                                </a>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <nav style="float: right;" >
                        <ul class="pagination" >
                            <li>
                                <a href="#"
                                   aria-label="Previous">
                                    <span aria-hidden="true">&laquo;</span>
                                </a>
                            </li>
                            <li>
                                <a href="#">1</a>
                            </li>
                            <li>
                                <a href="#">2</a>
                            </li>
                            <li>
                                <a href="#">3</a>
                            </li>
                            <li>
                                <a href="#">4</a>
                            </li>
                            <li>
                                <a href="#">5</a>
                            </li>
                            <li>
                                <a href="#"
                                   aria-label="Next">
                                    <span aria-hidden="true">&raquo;</span>
                                </a>
                            </li>
                        </ul>
                    </nav>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>